/**
 * .--------------------------------------------.
 * |  Funktionssammlung aller JavaScripte für   |
 * |  die Ausführung werend der Laufzeit auf    |
 * |  Clientseite.                              |
 * '--------------------------------------------'
 */


function On(name){
    document.getElementById(name).style.border = "block";
}
function Off(name){
        document.getElementById(name).style.border = "none";
}
function active(name){
   
    if(document.getElementById(name).style['WebkitBoxShadow']=="green 5px 10px 25px"){
        document.getElementById(name).style['WebkitBoxShadow']="3px 5px 15px black"
    }else{
        document.getElementById(name).style['WebkitBoxShadow']="5px 10px 25px green"
    }
    
    if(document.getElementById(name).style['MozBoxShadow']=="green 5px 10px 25px"){
        document.getElementById(name).style['MozBoxShadow']="3px 5px 15px black"
    }else{
        document.getElementById(name).style['MozBoxShadow']="5px 10px 25px green"
    }
}
function neu_Produkt(){
    document.getElementById('new_Seite').style.display="block";
}
function neu_Katalog(){
    document.getElementById('new_Katalog').style.visibility = "visible";
}
function ausblenden(){
    var k=0;
    var m=0;
    for(var i=1;i<=20;i++){
        name="Produkt_"+i;
        if(m==0){
            if(!document.getElementById(name)){
                m=1;
            }else{k++;}
        }}
    document.forms["neuer_Katalog"].elements["ProduktIDs"].value=""
    
    for(var j=1;j<=k;j++){
        name="Produkt_"+j;
         if(document.getElementById(name).style['WebkitBoxShadow']=="green 5px 10px 25px"){
        document.getElementById(name).style.display="block";
        
        document.forms["neuer_Katalog"].elements["ProduktIDs"].value = document.forms["neuer_Katalog"].elements["ProduktIDs"].value + " " + document.forms[name].elements["ProduktID"].value;

    }else{
        document.getElementById(name).style.display="none";
        }
    }
    
    document.getElementById('Seite_letzte').style.display="none";
}
function tool_fade_in() {
  if (per<1) {
    document.getElementById("footer").style.opacity=per;
    per+=0.01;
    }
  document.getElementById("footer").style.opacity=per;
  setTimeout("tool_fade_in()",100);
}
